<ix-fieldset [title]="'Replication Schedule' | translate" [formGroup]="form">
  <ix-checkbox
    formControlName="auto"
    [label]="'Run Automatically' | translate"
    [tooltip]="helptext.autoTooltip | translate"
  ></ix-checkbox>
  <ix-checkbox
    formControlName="schedule"
    [label]="'Schedule' | translate"
    [tooltip]="helptext.scheduleTooltip | translate"
  ></ix-checkbox>
  @if (form.value.schedule) {
    <ix-scheduler
      formControlName="schedule_picker"
      [label]="'Frequency' | translate"
      [tooltip]="helptext.schedulePickerTooltip | translate"
    ></ix-scheduler>
    @if (form.value.schedule_picker === CronPresetValue.Hourly) {
      <ix-select
        formControlName="schedule_begin"
        [label]="'Begin' | translate"
        [options]="timeOptions$"
        [tooltip]="helptext.scheduleBeginTooltip | translate"
      ></ix-select>
    }
    @if (form.value.schedule_picker === CronPresetValue.Hourly) {
      <ix-select
        formControlName="schedule_end"
        [label]="'End' | translate"
        [options]="timeOptions$"
        [tooltip]="helptext.scheduleEndTooltip | translate"
      ></ix-select>
    }
  }
  @if (form.value.schedule) {
    <ix-checkbox
      formControlName="only_matching_schedule"
      [label]="'Only Replicate Snapshots Matching Schedule' | translate"
      [tooltip]="helptext.onlyMatchingScheduleTooltip | translate"
    ></ix-checkbox>
  }
</ix-fieldset>
